//
// Created by cychen on 2023/3/8.
//

#include "../include/Config.h"

bool Config::isRing() const {
    return ring;
}

void Config::setRing(bool _ring) {
    Config::ring = _ring;
}

int Config::getHeadLimit() const {
    return headLimit;
}

void Config::setHeadLimit(int _headLimit) {
    Config::headLimit = _headLimit;
}

int Config::getTailLimit() const {
    return tailLimit;
}

void Config::setTailLimit(int _tailLimit) {
    Config::tailLimit = _tailLimit;
}

int Config::getRejectLimit() const {
    return rejectLimit;
}

void Config::setRejectLimit(int _rejectLimit) {
    Config::rejectLimit = _rejectLimit;
}

int Config::getState() const {
    return state;
}

void Config::setState(int _state) {
    Config::state = _state;
}

Config *Config::instance = nullptr;

Config *Config::getInstance() {
    if (instance == nullptr) {
        instance = new Config();
    }
    return instance;
}

void Config::resetInstance() {
    instance = nullptr;
}

Config::~Config() = default;
